#include<bits/stdc++.h>
using namespace std;

bool solution(string n) {
    return n[0] + n[1] + n[2] == n[3] + n[4] + n[5];
}

int main() {
    int n;
    cin >> n;
    while (n--) {
        string number;
        cin >> number;
        if (solution(number)) cout << "You are lucky!" << endl;
        else cout << "Wish you good luck." << endl;
    }
    return 0;
}